﻿<UserControl x:Class="Adaptive.ReactiveTrader.Client.UI.SpotTiles.SpotTileErrorView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:designer="clr-namespace:Adaptive.ReactiveTrader.Client.UI.SpotTiles.Designer;assembly=Adaptive.ReactiveTrader.Client"
             mc:Ignorable="d" 
             d:DesignHeight="150"
             d:DesignWidth="328"
             d:DataContext="{d:DesignInstance designer:DesignTimeSpotTileErrorViewModel, IsDesignTimeCreatable=True}">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Adaptive.ReactiveTrader.Client.GUI;component/Styles/Brushes.xaml" />
                <ResourceDictionary Source="/Adaptive.ReactiveTrader.Client.GUI;component/Styles/Button.xaml" />
            </ResourceDictionary.MergedDictionaries>
            
            <Style TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
                <Setter Property="FontSize" Value="16" />
            </Style>
        </ResourceDictionary>
    </UserControl.Resources>

    <Border Padding="15,12" Background="{StaticResource ErrorBackgroundBrush}">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
                <TextBlock Text="Error" Foreground="{StaticResource PrimaryForeground}" FontSize="18" />

                <DockPanel>
                    <TextBlock Text="{Binding ErrorMessage}" Foreground="#FFE8C0BB" TextWrapping="Wrap" FontSize="15" />
                </DockPanel>
            </StackPanel>

            <Button Grid.Row="1" Content="Done" Command="{Binding DismissCommand, Mode=OneWay}" Foreground="#FFE8C0BB" Style="{StaticResource HyperlinkButtonStyle}" FontSize="16" HorizontalAlignment="Right" />
        </Grid>
    </Border>
</UserControl>
